#include <stdio.h>
#include "KMP-matching.h"

int main(){
    //test BuildNext
    char str_buffer[] = "abcdefghi";
    char str_pattern[128];

    int location = 0;

    puts(str_buffer);
    printf("Please input the characters which you want to search!\n");
    scanf("%[^\n]s",str_pattern);
    MatchPattern(str_buffer,str_pattern,&location);
    printf("%s is at %dth\n",str_pattern,location);
    return(0);
}